-- GENERATED SPELL FOR [Cyclok the Mad] --


function spell0_8202(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(20829,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8202', 1000, 1)
end

function spell1_8202(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(11975,pUnit)
pUnit:RegisterEvent('Sorts_8202', 1500, 1)
end

function spell2_8202(pUnit, Event) --@Bloodlust,n/a--
pUnit:FullCastSpellOnTarget(6742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8202', 30328, 1)
end

function Sorts_8202(pUnit, Event)
local choix_sorts_8202 = math.random(0, 2)
if choix_sorts_8202 == 0 then
pUnit:RegisterEvent('spell0_8202', 1, 1)
end
if choix_sorts_8202 == 1 then
pUnit:RegisterEvent('spell1_8202', 1, 1)
end
if choix_sorts_8202 == 2 then
pUnit:RegisterEvent('spell2_8202', 1, 1)
end
end

function mob8202_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8202', math.random(1500, 3000), 1)
end

function mob8202_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8202_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8202_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8202, 1, 'mob8202_Action')
RegisterUnitEvent(8202, 2, 'mob8202_Leave')
RegisterUnitEvent(8202, 3, 'mob8202_Kill')
RegisterUnitEvent(8202, 4, 'mob8202_Die')
